package org.lmj.dos.web.resultdo;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
public class ProductVo {
   // 1.产品搜索及动态排序List ,GET /products
   @Data
   @Builder
   @AllArgsConstructor
   @NoArgsConstructor
    public static class GetProducts{
       private Integer pageNum;

       private Integer pageSize;

       private Integer size;

       private String orderBy;

       private Integer startRow;

       private Integer endRow;

       private Integer total;

       private Integer pages;

       private List<ProductsItems> productList;

       private Integer firstPage;

       private Integer prePage;

       private Integer nextPage;

       private Integer lastPage;

       private boolean hasPreviousPage;

       private boolean hasNextPage;

       private Integer navigatePages;

       private List<Integer> navigatepageNums;

       private Integer navigateFirstPage;
       private Integer navigateLastPage;


    //  private boolean firstPageIs;
    @JsonProperty(value = "isFirstPage")
       private boolean isFirstPage;

       @JsonProperty(value = "isLastPage")
       private boolean isLastPage;
   }
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class ProductsItems
    {
        private Integer id;

        private Integer categoryId;

        private String name;

        private String subtitle;

        private String mainImage;
        private String imageHost;

        private int status;

        private double price;

    }

    //#### 2.产品detail
    //
    //**GET /products/{productId}
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public  static  class  GetProductDetail{

       private  String imageHost;

        private int id;

        private int categoryId;

        private String name;

        private String subtitle;

        private String mainImage;

        private String subImages;

        private String detail;

        private double price;

        private int stock;

        private int status;

        private String createTime;

        private String updateTime;

        private Long parentCategoryId;

    }

}




